public class CallPackage implements CallPackageInterface /*extends Package*/ {
    int duration = 200;         // 通话时长
    int massageNumber = 1000;    // 短信条数
    int monthCost = 100;        // 每月资费


    public CallPackage() {
    }

    public CallPackage(int duration, int massageNumber, int monthCost) {
        this.duration = duration;
        this.massageNumber = massageNumber;
        this.monthCost = monthCost;
    }


    public void show() {
        System.out.printf("通话时长："+duration+"分钟%n短信条数："+massageNumber+"条%n每月资费："+monthCost+"元%n");
    }

    @Override
    public void callInfo(int duration, SimCard simcard) {
        simcard.setDuration(duration);
        System.out.printf("用户："+simcard.getUsername()+"%n手机号："+simcard.getNumber()
                +"%n通话时长是："+simcard.getDuration()+"%n");

    }
}
